﻿@model PageListDisplayModel
@inject ICofoundryBlockTypeHelper<PageListDisplayModel> Cofoundry

@*
    Here we can use the Cofoundry helper to set the description that
    gets displayed against the module in the administration interface.

    This is optional and doesn't render anything into the template itself.
*@
@Cofoundry.BlockType.UseDescription("An orderable list of links to pages")

@if (!EnumerableHelper.IsNullOrEmpty(Model.Pages))
{
<ul>
    @foreach (var pageItem in Model.Pages)
    {
        <li>
            <a href="@Cofoundry.Routing.Page(pageItem.PageRoute)">@pageItem.Title</a>
            <p>
                @pageItem.MetaDescription
            </p>
        </li>
    }
</ul>
}